<#import "/spring.ftl" as spring/>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>一码付</title>
    <script src="<@spring.url '/vendor/jquery-3.2.1.min.js'/>"></script>
    <script>
    $(function() {
        $.ajax({
            url: '${appUrl}/qrcodes',
            method: 'POST',
            contentType: 'application/json; charset=utf-8',
            headers: {
                "Authorization": '${auth}'
            },
            processData: false,
            data: '${data}',
            success: function(resp) {
                $('#qrcode').html('<img src="data:image/png;base64,' + resp + '" />');
            }
        });
    });
    </script>
</head>

<body>
    <div id="qrcode"></div>
</body>
</html>